package com.oa.util.control;

public class FormSelect
{

    private String formOption;

    public FormSelect()
    {
        formOption = "";
    }

    public void initFormSelect(String formName)
    {
        formOption = String.valueOf(String.valueOf((new StringBuffer("<select size=\"1\" name=\"")).append(formName).append("\">")));
        formOption = String.valueOf(String.valueOf(formOption)).concat("\n<option selected value=\"0\">\u8BF7\u9009\u62E9</option>");
    }

    public void initFormNoSelect(String formName)
    {
        formOption = String.valueOf(String.valueOf((new StringBuffer("<select size=\"1\" name=\"")).append(formName).append("\">")));
    }

    public void endFormSelect()
    {
        formOption = String.valueOf(String.valueOf(formOption)).concat("\n</select>");
    }

    public void addFormOption(String optionId, String optionValue)
    {
        formOption = String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(formOption)))).append("\n<option value=\"").append(optionId).append("\" >").append(optionValue).append("</option>")));
    }

    public void addFormOptionNoHead(String optionId, String optionValue)
    {
        formOption = String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(formOption)))).append("\n<option value=\"").append(optionId).append("\" >").append(optionValue).append("</option>")));
    }

    public void addFormOptionSelected(String optionId, String optionValue)
    {
        formOption = String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(formOption)))).append("\n<option value=\"").append(optionId).append("\" selected >").append(optionValue).append("</option>")));
    }

    public String getFormSelect()
    {
        return formOption;
    }
}
